﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo2
{
    class DeliveryRobot: Robot
    {
        private double hours;
        public double Dours
        {
            get { return this.hours; }
            set { this.hours = value; }
        }
        public DeliveryRobot(string name, double Hours) : base(name)
        {
            this.hours = Hours;
        }
        public DeliveryRobot() { }
        public override void Working()
        {
            Console.WriteLine("请输入本次工作时长：");
            this.hours = double.Parse(Console.ReadLine());
            Console.WriteLine("我是传菜机器人{0}，本次的工作时长是{1}小时",base.name,this.hours);
        }
    }
}
